﻿
@{
    Layout ="~/Views/Shared/admin_view.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>xianshi</title>
    <link href="~/Content/bootstrap.min.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <link href="~/Content/boot.css.css" rel="stylesheet" />
    <script src="~/Scripts/pageDing.js"></script>
</head>
<body>
    <div style="float:left;width:1200px;height:640px;margin-left:50px;margin-top:25px"> 
       <table class="table table-hover">
           <thead>
               <tr>
                   <td>医院图片</td>
                   <td style="width:200px;height:80px;">医院名称</td>
                   <td style="width:600px;height:80px;">医院简介</td>
                   <td>医院地址</td>
                   <td>医院电话</td>
               </tr>
           </thead>
         <tfoot id="tfootid"></tfoot>
       </table>
        <div id="pageHtml" style="text-align:center"></div>
    </div>
   
</body>
</html>
<script>
    GoToPage(1, "pageHtml");
    function GoToPage(pageindex, pagehtml) {
        $.ajax({
            url: "/hospital/xianshi",
            type: "post",
            data: { pageindex: pageindex, pagesize: 3 },
            success: function (data) {
                var str = "";
                for (var i = 0; i < data.Itemlist.length; i++) {
                    str += " <tr>";
                    str += "   <td><img src=\""+ data.Itemlist[i].Hosp_Image +"\"  style=\"width:50px;height:50px;\"/></td>";
                    str += "   <td>" + data.Itemlist[i].Hosp_Name + "</td>";
                    str += "   <td>" + data.Itemlist[i].Hosp_Message + "</td>";
                    str += "   <td>" + data.Itemlist[i].Hosp_Address + "</td>";
                    str += "   <td>" + data.Itemlist[i].Hosp_Phone + "</td>";
                    str += " </tr>";
                }
                $("#tfootid").html(str);
                GetpageHtml(data.totalcount, pageindex, pagehtml)
            }
        })
    }
</script>
